package com.service.impl;

import com.dao.SeatDAO;
import com.entity.Seats;
import com.service.SeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class SeatServiceImpl implements SeatService {

	@Qualifier("seatDAO")
	@Autowired
	private SeatDAO seatDAO;

	@Override // 继承接口的新增 返回值0(失败),1(成功)
	public int insertSeat(Seats seat) {
		return this.seatDAO.insertSeat(seat);
	}

	@Override // 继承接口的更新 返回值0(失败),1(成功)
	public int updateSeat(Seats seat) {
		return this.seatDAO.updateSeat(seat);
	}

	@Override // 继承接口的删除 返回值0(失败),1(成功)
	public int deleteSeat(String seatid) {
		return this.seatDAO.deleteSeat(seatid);
	}

	@Override // 继承接口的查询全部
	public List<Seats> getAllSeat() {
		return this.seatDAO.getAllSeat();
	}

	@Override // 继承接口的按主键查询 返回Entity实例
	public Seats getSeatById(String seatid) {
		return this.seatDAO.getSeatById(seatid);
	}

}
